<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ taglib uri="/WEB-INF/myfaces_sandbox.tld"   prefix="s" %>

<%@ page import="javax.faces.context.FacesContext" %>


<f:view >
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it-it" lang="it-it" dir="ltr" >
        <head>			
            <title>Autolinee Moretti</title>

            <!-- Stile Bootstrap -->
            <meta name="viewport" content="width=device-width, initial-scale=1.0">		
                <link href="css/bootstrap.css" rel="stylesheet">	
                    <link rel="stylesheet" href="./moretti.css" type="text/css">
                        <link href="http://fonts.googleapis.com/css?family=Alegreya+Sans+SC" rel="stylesheet" type="text/css">
                            <link href="http://fonts.googleapis.com/css?family=Alef" rel="stylesheet" type="text/css">

                                <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
                                <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
                                <!--[if lt IE 9]>
                                  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                                  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
                                <![endif]-->

                                <!-- Stile bxSlider -->
                                <link href="css/jquery.bxslider.css" rel="stylesheet">		

                                    <!-- Stile personalizzato -->
                                    <link href="css/style.css" rel="stylesheet">		

                                        <link href="immagini/favicon.ico" rel="shortcut icon" type="image/x-icon" />
                                        </head>

                                        <body>

                                            <div class="container">
                                                <div class="row">
                                                    <div class="col-md-8">
                                                        <h1 class="navbar-brand navbar-brand_">
                                                            <a href="home.jsf"><img style="width:100%" alt="Autolinee Moretti" src="immagini/logo.png"></a>			
                                                        </h1>
                                                    </div>

                                                    <div class="col-md-4">
                                                        <div class="header_right">
                                                            Lingue <br/> Altre informazioni <br/> Quello che serve
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="navbar navbar-default" role="navigation">
                                                    <div class="navbar-header">
                                                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                                                            <span class="sr-only">Toggle navigation</span>
                                                            <span class="icon-bar"></span>
                                                            <span class="icon-bar"></span>
                                                            <span class="icon-bar"></span>
                                                        </button>
                                                    </div>

                                                    <div class="navbar-collapse collapse">
                                                        <ul class="nav navbar-nav">
                                                            <li ><a href="home.jsf">Home</a></li> 
                                                            <li><a href="chisiamo.jsf">Chi siamo</a></li>
                                                            <li><a href="flotta.jsf">Flotta</a></li>
                                                            <li><a href="contatti.jsf">Contatti</a></li>
                                                            <li><a href="news.jsf">News</a></li>
                                                            <li class='active'><a  href="login.jsf">Registrati</a> </li>


                                                        </ul>
                                                    </div>
                                                </div> 

												<div class="row">
                                                    <div class="col-md-8">
														<table valign="middle">

															<tr>
																<td>
																	<h:form id="form" > 
																		<t:saveState value="#{beanAppPrenotazione}"/>            

																		<table class="dettaglio" style="width: 400px">
																			<tbody>

																				<tr>                            
																					<td align="right" class="login"><strong><h:outputText  value="Nome utente" /></strong></td>
																					<td align="right"><t:inputText forceId="true" id="email" value="#{login.email}"/>

																				</tr>

																				<tr>
																					<td align="right" class="login"><strong><h:outputText  value="Password"/></strong></td>
																					<td align="right"><t:inputSecret forceId="true" id="password1" value="#{login.password}"/> </td>

																				</tr>
																				<tr>
																					<td>                                                                        <a class="active" href="recuperaPassword.jsf">Recupera Password</a> 
																					</td>
																					<td align="right"><h:commandButton value="Login" action="#{azioneLogin.esegui}" /></td>
																				</tr>

																				<tr>
																				</tr>
																				<br />  
																				<br />  


																			</tbody>
																		</table>
																	</h:form>
																</td>
															</tr>


															<tr>
																<td>
																	<br />
																	<br />
																	<h:form  id="formLookup">    
																		<t:saveState value="#{beanUtente}"/>

																		<table class="dettaglio" style="width: 400px">
																			<tbody> 

																				<tr>                    
																					<td colspan="2" align="center"><strong>
																							<t:outputLabel  value="Nuova Registrazione"/></strong></td>

																				</tr>  



																				<tr>                   
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="emailr" value="Email (*)"/></strong></td>
																					<td><t:inputText id="emailr" value="#{beanUtente.email}" size="20" maxlength="20" styleClass="dettaglio_InputText" required="true"/>
																						<br/>
																						<h:message style="color: red" for="emailr" showDetail="true" showSummary="false" />
																					</td>
																				</tr>  

																				<tr>                   
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="password" value="Password (*)"/></strong></td>
																					<td><t:inputSecret id="password" value="#{beanUtente.password}" size="20" maxlength="20" styleClass="dettaglio_InputText"  required="true"/>
																						<br/>
																						<h:message style="color: red" for="password" showDetail="true" showSummary="false" />
																					</td>
																				</tr>  

																				<tr>                   
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="confermaPassword" value="Conferma Password (*)"/></strong></td>
																					<td><t:inputSecret id="confermaPassword" value="#{beanUtente.confermaPassword}" size="20" maxlength="20" styleClass="dettaglio_InputText" required="true"/>
																						<br/>
																						<h:message style="color: red" for="confermaPassword" showDetail="true" showSummary="false" />
																					</td>
																				</tr>  

																				<tr>                   
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="cognome" value="Cognome"/></strong></td>
																					<td><t:inputText id="cognome" value="#{beanUtente.cognome}" size="30" maxlength="30" styleClass="dettaglio_InputText" onchange="this.value=this.value.toUpperCase()" required="true"/>
																						<br/>
																						<h:message style="color: red" for="cognome" showDetail="true" showSummary="false" />
																					</td>
																				</tr>   

																				<tr>     
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="nome" value="Nome"/></strong></td>
																					<td><t:inputText id="nome" value="#{beanUtente.nome}" size="30" maxlength="30" styleClass="dettaglio_InputText" onchange="this.value=this.value.toUpperCase()" required="true"/>
																						<br/>
																						<h:message style="color: red" for="nome" showDetail="true" showSummary="false" />
																					</td>
																				</tr>   

																				<tr> 
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="dataNascita" value="Data Nascita"/></strong></td>
																					<td><h:outputText value=" (gg/mm/aaaa)" style="font-size:6.5pt"/>
																						<br/>
																						<t:inputDate id="dataNascita" popupCalendar="false" styleClass="campoTesto" value="#{beanUtente.dataNascita}">
																							<f:convertDateTime pattern="dd/MM/yyyy" type="both" timeZone="Europe/Rome"/>
																						</t:inputDate>
																						<h:message style="color: red" for="dataNascita" showDetail="true" showSummary="false" />
																					</td>
																				</tr>        

																				<tr>                   
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="sesso" value="Sesso(*)"/></strong></td>
																					<td>
																						<t:selectOneMenu id="sesso" value="#{beanUtente.sesso}" disabled="true">
																							<f:selectItem itemValue="M" itemLabel="Maschio"/>
																							<f:selectItem itemValue="F" itemLabel="Femmina"/>
																						</t:selectOneMenu>  
																					</td>
																				</tr>  

																				<tr>
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="descrizioneComune_Nascita" value="Comune di Nascita" /></strong></td>
																					<td>
																						<h:selectOneMenu id="comuneNascita" value="#{beanUtente.idComuneNascita}"  style=" width:90%;">
																							<f:selectItems value="#{beanUtente.listaComuni}" />
																						</h:selectOneMenu> 
																					</td>              

																				</tr>  

																				<tr>     
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="codicefiscale" value="Codice fiscale"/></strong></td>
																					<td><t:inputText id="codicefiscale" value="#{beanUtente.codicefiscale}" size="30" maxlength="16" styleClass="dettaglio_InputText" onchange="this.value=this.value.toUpperCase()" required="true"/>
																						<br/>
																						<h:message style="color: red" for="codicefiscale" showDetail="true" showSummary="false" />
																					</td>
																				</tr>   


																				<tr>     
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="telefono" value="Telefono"/></strong></td>
																					<td><t:inputText id="telefono" value="#{beanUtente.telefono}" size="30" maxlength="30" styleClass="dettaglio_InputText" onchange="this.value=this.value.toUpperCase()" required="true"/>
																						<br/>
																						<h:message style="color: red" for="telefono" showDetail="true" showSummary="false" />
																					</td>
																				</tr>   

																				<tr>     
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="cellulare" value="Cellulare"/></strong></td>
																					<td><t:inputText id="cellulare" value="#{beanUtente.cellulare}" size="30" maxlength="16" styleClass="dettaglio_InputText" onchange="this.value=this.value.toUpperCase()" required="true"/>
																						<br/>
																						<h:message style="color: red" for="cellulare" showDetail="true" showSummary="false" />
																					</td>
																				</tr>  

																				<tr>
																					<td class="etichettaDettaglio"><strong><t:outputLabel for="descrizioneComune_Residenza" value="Comune di Residenza" /></strong></td>
																					<td>
																						<h:selectOneMenu id="comuneResidenza" value="#{beanUtente.idComuneResidenza}"  style=" width:90%;">
																							<f:selectItems value="#{beanUtente.listaComuni}" />
																						</h:selectOneMenu> 
																					</td>              

																				</tr>  
																				<tr >    
																					<td >
																						<h:commandButton dir="RTL" value="Registrati" action="#{dettaglioUtente.registrazione}" >
																							<f:param name="bean" value="beanUtente" />
																						</h:commandButton>       
																					</td>
																				</tr>
																			</tbody>
																		</table>
																		<t:inputHidden value="#{beanUtente.id}"/>   

																	</h:form>

																	<h:form id="erroriDataBase" rendered="false">
																		<table><td align="left" class="messaggiErrore" height="2px">           
																				<h:messages style="color: red" showDetail="true" showSummary="false"/>
																			</td></table>
																		</h:form>     
																</td>
															</tr>



														</table>
													</div>
													
													<div class="col-md-4">					
                                                        <h1 class="in_evidenza">In evidenza</h1>	
                                                        <jsp:include page="evidenza.jsp"/>

                                                    </div>
                                                </div>	

                                                <script type="text/javascript">
                                                    document.getElementById('utente').focus();
                                                </script>
                                                <jsp:include page="/footerPortale.jsp"/>

                                                <jsp:include page="/piePagina.jsp"/>
                                            </f:view>
